<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    window.onload = function () {
        var ca = document.cookie.split(';');
        for(var i=0; i<ca.length; i++) {
            var c = ca[i].trim();
           alert(c)
        }
    }
</script>
<body>
<a href="/cookie-demo/AServlet"> 访问AServlet</a>
</body>
</html>